<template>
    <div>
        <p>{{$route.query.uid}}</p>
        <button @click="back">返回2</button>
        <button @click="replaceToOne">进入1，不允许返回</button>
        <router-link :to="{name:'child1'}" replace tag="div">进入1，不允许返回</router-link>
    </div>
</template>

<script>
    export default {
        name:'child3',
        methods:{
            back(){
                this.$router.go(-1);
            },
            replaceToOne(){
                this.$router.replace({name:'child1',query:{uid:3}})
            }
        }
    }
</script>

<style scoped>

</style>